<?
error_reporting(E_ERROR);
ini_set('display_errors', 1);
ini_set('session.gc_maxlifetime', '3600');
#################################### DB USER ###################################################
$_CONFIG_INI = parse_ini_file("cfg.ini", true);
$arrcfg = $_CONFIG_INI['admin'];
$sqlserver = $arrcfg['hostname'];
$sqluser = $arrcfg['username']; 
$sqlpass = $arrcfg['password']; 
$sqldb = $arrcfg['database'];
$ftp_host = $arrcfg['host'];
$ftp_username = $arrcfg['userftp'];
$ftp_pwd = $arrcfg['pwftp'];
define('WS_NAME',$arrcfg['ws_name']);
define('FOLDER',$arrcfg['folder']);
define('FOLDER_IMAGES','uploads');                 
###############################################################################
switch(basename($_SERVER[PHP_SELF])) {
	default:
		include '../source/adodb/adodb.inc.php';
		include '../source/includes/functions.php';
		break;
		
	case "server.php":
		include '../../source/adodb/adodb.inc.php';
		include '../../source/includes/functions.php';	
		break;
}
$conn = NewADOConnection('mysqli');
$conn->clientFlags = 131072;
//$conn->debug = true;
$conn->NConnect($sqlserver, $sqluser, $sqlpass, $sqldb);
$conn->SetFetchMode(ADODB_FETCH_ASSOC);
?>